<form class="example-form" [formGroup]="loginForm" (ngSubmit)="onSubmit(loginForm,$event)">
    <mat-card>
        <mat-card-title>登陆</mat-card-title>
        <mat-card-content>
            <mat-form-field class="example-full-width">
                <input matInput placeholder="您的email" formControlName="email">
                <mat-error>{{loginForm.controls['email'].errors.emalNotValid|json}}</mat-error>
            </mat-form-field>
            <mat-form-field class="example-full-width">
                <input matInput placeholder="password" formControlName="password">
            </mat-form-field>
            <button mat-raised-button color="primary" type="submit" style="width: 100%;" [disabled]="!loginForm.valid">登陆</button>
        </mat-card-content>
        <mat-card-actions>
            <p>还没有注册？<a routerLink="/register">注册</a></p>
            <p>忘记密码<a href="##">找回密码</a></p>
        </mat-card-actions>
    </mat-card>
</form>